#include"list.h"

void test_list1()
{
	wjz::list<int> lt;
	wjz::list<int>::iterator end = lt.end();
	wjz::list<int>::iterator it = lt.begin();

	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	//for (auto e : lt)
	//{
	//	cout << e << ' ';
	//}
	//cout << endl;

	lt.Print();
}


void test_list2()
{
	wjz::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	lt.Print();
	wjz::list<int>::iterator end = lt.end();
	wjz::list<int>::iterator it = lt.begin();
	lt.pop_back();
	lt.pop_back();
	lt.pop_back();

	lt.Print();

}

void test_list3()
{
	wjz::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
	lt.Print();
	wjz::list<int> lt1(lt);
	lt1.Print();
	wjz::list<int> lt2 = lt;
	lt2.Print();
}

void test_list4()
{
	wjz::list<int> lt(10, 1);
	lt.Print();

	int arr[] = { 1, 2, 3, 4, 5 };
	wjz::list<int> lt1(arr, arr + 5);
	lt1.Print();

	std::vector<int> v = { 10, 20, 30 };
	wjz::list<int> lt2(v.begin(), v.end());
	lt2.Print();

}

int main()
{
	test_list4();
	return 0;
}